import requests
from config import base_url


def getToken():
    url = base_url + "/login"
    method = "post"
    header = {}
    data = {"username":"langjin","password":"123456"}
    r = requests.request(method,url,headers=header,json=data)
    return r.json()["data"][0].get("token")